/*
package com.byit.Test.ThreadPool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

*/
/**
 * @ClassName ThreadPoolTest2
 * @Description TODO
 * @Author lxp
 * @Date 2018/10/9 0009
 **//*

public class ThreadPoolTest2 {

    ExecutorService threadPool = Executors.newCachedThreadPool();
        for (int j = 0; j <= 10; j++) {
        final int task = j;
        threadPool.execute(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 10; i++) {
                    try {
                        Thread.sleep(200);
                    } catch (InterruptedException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                    System.out.println(Thread.currentThread().getName()+"is looping of "+ i +" task of "+task);
                }

            }
        });
    }
}
*/
